package com.ruoyi.rest.controller;

import com.ruoyi.book.domain.Fiction;
import com.ruoyi.book.service.IChapterService;
import com.ruoyi.book.service.IFictionService;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 电子书列表Controller
 * 
 * @author 沉睡
 * @date 2024-08-05
 */
@Anonymous
@RestController
@RequestMapping("/rest/book/fiction")
public class RestFictionController extends BaseController
{
    @Autowired
    private IFictionService fictionService;

    /**
     * 查询电子书列表列表
     */
    @GetMapping("/list")
    public TableDataInfo list(Fiction fiction)
    {
        List<Fiction> list = fictionService.selectFictionList(fiction);
        return getDataTable(list);
    }

}
